package com.logic.landseaserver.models.authcode.ws;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.logic.common.enums.HttpCodeEnum;
import com.logic.common.util.CommonResultMap;
import com.logic.landseaserver.models.authcode.bean.QueryUsableAuthCodeReq;
import com.logic.landseaserver.models.authcode.service.AuthCodeService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * 
 *
 * 项目名称：system-server</br>
 * 类名称：AuthCodeRest</br>
 * 类描述：授权码</br>
 * 创建人：Aaron</br>
 * 创建时间：2017年9月11日 上午10:07:13</br>
 * @version 1.0
 *
 */
@Path("/authcode")
@Api(value = "授权码")
public class AuthCodeRest
{
    private static final Logger LOGGER = LoggerFactory.getLogger(AuthCodeRest.class);
    
    @Autowired
    private AuthCodeService authCodeService; 
    
    /**
     *
     * [简要描述]：根据授权码使用场景，查询满足的授权码</br>
     * [详细描述]：</br>
     * [作者]：Aaron(2017-09-11)</br>
     *
     * @param queryUsableAuthCodeReq
     * @return
     *
     */
    @POST
    @Path("/queryUsableAuthCode")
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_JSON)
    @ApiOperation(value = "查询可用的授权码")
    public Response queryUsableAuthCode(@ApiParam(value = "param", required = true) QueryUsableAuthCodeReq queryUsableAuthCodeReq)
    {
        CommonResultMap map = new CommonResultMap();

           // List<CouponDTO> result = authCodeService.queryUsableAuthCode(queryUsableAuthCodeReq);
            map.setData(null);

        return Response.status(HttpCodeEnum.OK.getCode()).entity(map).build();
    }
}
